<!DOCTYPE html>
<html>
    <head>
        <title>{$meta_title|default="XWAM"}-{$Think.lang.title_suffix}</title>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link href="__THEME__favicon.ico" rel="shortcut icon">
        <!--css-->
        <link href="__CSS__cssreset-min.css" rel="stylesheet" type="text/css">
        <link href="__CSS__unsemantic/assets/stylesheets/unsemantic-grid-responsive.min.css" rel="stylesheet" type="text/css">
        <link href="__SCRIPT__jquery-ui-1.11.4/themes/{$theme}/jquery-ui.min.css" rel="stylesheet" type="text/css">
        <link href="__CSS__font-awesome-4.6.1/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
        <link href="__SCRIPT__ui-layout-1.4.0/layout-default-min.css" rel="stylesheet" type="text/css"/>
        <link href="__SCRIPT__superfish-1.7.6/css/superfish.min.css" rel="stylesheet" type="text/css"/>
        <link href="__THEME__Css/index.min.css" rel="stylesheet" type="text/css"/>
        <style type="text/css">
            .header-icons { width:700px; float:left;}
            .header-icons .item { display:table; float:left; padding:10px 10px 0 10px; height:40px; border-left:solid 1px #376EA7; border-right: solid 1px rgb(187, 187, 187);}
            .header-icons i { vertical-align: middle;}
        </style>
        <!--/css-->
    </head>
    <body>
        <!--js-->
        <script src="__SCRIPT__jquery-1.12.3.min.js" type="text/javascript"></script>
        <script src="__SCRIPT__jquery-ui-1.11.4/jquery-ui.min.js" type="text/javascript"></script>
        <script src="__SCRIPT__jquery-ui-1.11.4/i18n/datepicker-zh-CN.js" type="text/javascript"></script>
        <script src="__SCRIPT__ui-layout-1.4.0/jquery.layout-min.js" type="text/javascript"></script>
        <script src="__SCRIPT__superfish-1.7.6/js/superfish.min.js" type="text/javascript"></script>
        <script src="__SCRIPT__Xslider/js/Xslider.js" type="text/javascript"></script>
        <script src="__SCRIPT__js-utility/js.cookie-2.1.1.min.js" type="text/javascript"></script>
        <script src="__THEME__Ctrl/Util/ifrmDialog-3.0.min.js" type="text/javascript"></script>
        <!--/js-->
        <div class="ui-layout-north">
            <header>
                <div class="header-top">
                    <!--logo-->
                    <h3 class="logo" style="width:360px; height:50px; line-height:50px; float:left;"><a href="{:U('Index/home')}">{$site_conf.site_title}</a></h3>
                    <!--logo-->
                    <div style="clear:left;"></div>
                </div>
            </header>                
        </div>
        <!--/顶部区域-->
        <!--侧边区域-->
    <if condition="'Y' eq $site_conf['ui_aside_status']"><!--侧边栏开关/-->
        <div class="ui-layout-west">
            <!--userzone-->
            <div class="aside-user-zone">
                <fieldset>
                    <legend class="xsui-hide"><img src="{$site_conf['site_sub_path']}{$login_data.face_url|default='/Uploads/Face/Default/face.png'}" title="{$login_data.name|default='头像'}" alt="头像" /><a href="{:U('User/profile_edit')}" class="xsui-lnk-edit-dialog-g" title="{$Think.lang.edit}{$login_data.name}{$Think.lang.profile}">{$login_data.user_name}</a><a class="lnk-logout" href="{:U('Login/logout')}" onclick="return confirm('{$Think.lang.logout_tip}?');">[{$Think.lang.logout}]</a></legend>
                    <a href="#" class="switch"><i class="fa fa-toggle-on"></i></a>
                    <div class="content">
                        <div class="face grid-40 mobile-grid-50"><img src="{$site_conf['site_sub_path']}{$login_data.face_url|default='/Uploads/Face/Default/face.png'}" title="{$login_data.name|default='头像'}" /></div>
                        <div class="info grid-60 mobile-grid-50">
                            <dl>
                                <dt title="{$login_data.name}">{$login_data.user_name}</dt>
                                <dd><a href="{:U('User/profile_edit')}" class="xsui-lnk-edit-dialog-g" title="{$Think.lang.edit_profile_tip}">[{$Think.lang.setting}]</a><a class="lnk-logout" href="{:U('Login/logout')}">[{$Think.lang.logout}]</a></dd>
                                <dd class="xsui-text-ellipsis" style="width:90px;" title="{$login_data.role_names}">{$login_data.role_names}</dd>
                            </dl>                    
                        </div>
                        <dl class="stat grid-100 mobile-grid-100">
                            <if condition="'SEAT' eq $login_data['type_name']">
                                <dt>状态：</dt>
                                <dd><strong class="exten-workbench-status-content" style="color:#FC0;"></strong><a href="/xcall/index.php/XCall/CtiManager/seat_state/rnd/varrnd/exten/{$login_data['user_name']}" class="extension-status  exten-workbench-status" title="刷新状态信息" style="margin:0;"><i class="fa fa-refresh fa-fw"></i></a></dd>
                            </if>
                            <dt>{$Think.lang.department}：</dt>
                            <dd class="xsui-text-ellipsis" style="width:130px;" title="{$login_data.department_names}">{$login_data.department_names}</dd>
                            <dt>{$Think.lang.last_login}：</dt>
                            <dd title="{$login_data.login_time} {$Think.lang.login_at} {$login_data.login_ip}, {$Think.lang.login_count} {$login_data.login_count}">{$login_data.login_time|sofn_tran_time}</dd>
                        </dl>
                    </div>
                </fieldset>
            </div>
            <!--/userzone-->
            <if condition="false">
                <!--2016-3-16 侧边全菜单后,破坏布局，暂时用底部替代-->
                <!--clockzone-->
                <div class="aside-clock-zone">                
                    <div class="clock">                        
                        <span title="">0000-00-00 00:00:00</span>
                        <i class="icon fa fa-sun-o" title=""></i>
                        <a href="#" class="switch"><i class="fa fa-toggle-off"></i></a>
                    </div>
                    <div class="aside-calendar xsui-hide"></div>
                </div>
                <!--/timezone-->
            </if>
            <!--asidemenu-->
            <div class="aside-menu" data-url="{:U('Menu/get_aside_menu','id=varid')}">
                <foreach name="stores" item="vo">
                    <fieldset>
                        <legend class="switch">门店-{$vo.text}<a href="javascript:"><i class="fa fa-toggle-on"></i></a></legend>
                        <ul>
                            <foreach name="storemenus" item="vo3">
                                <li><a class="menu-link" href="{:U($vo3['url'],'store_id='.$vo['id'])}" data-id="{$vo3.id}"><i class="fa fa-caret-right fa-fw"></i>{$vo3.title}</a></li>
                            </foreach>
                        </ul>
                    </fieldset>
                </foreach>
                <foreach name="menuset" item="vo">
                    <fieldset>
                        <legend class="switch">{$vo.title}<a href="javascript:"><i class="fa fa-toggle-on"></i></a></legend>
                        <ul>
                            <foreach name="vo['children']" item="vo2">
                                <!--<li class="xsui-menu-header">{$vo2.title}</li>-->
                                <foreach name="vo2['children']" item="vo3">
                                    <li><a class="menu-link" href="{:U($vo3['url'])}" data-id="{$vo3.id}"><i class="fa fa-caret-right fa-fw"></i>{$vo3.title}</a></li>
                                </foreach>
                            </foreach>
                        </ul>
                    </fieldset>
                </foreach>
            </div>
            <!--/asidemenu-->
        </div>
    </if>
    <!--/侧边区域-->
    <!--主体区域-->
    <div class="ui-layout-center">
        <main></main>
    </div>
    <!--/主体区域-->
    <!--底部区域-->
    <div class="ui-layout-south">
        <!--notices-slider-->
        <div class="notices-slider grid-50 mobile-grid-50">
            <div class="slider-content">
                <label><i class="fa fa-bullhorn"></i></label>
                <ul id="slider-content-list" data-url="{:U('Notices/get_notices_list_json','sign=varsign')}" data-href="{:U('Notices/document_view','id=varkey')}">
                    <li><a href="#" title="sdfa">日本通过防卫大纲 明确提出加强钓鱼岛等防卫日本通过防卫大纲 明确提出加强钓鱼岛等防卫日本通过防卫大纲 明确提出加强钓鱼岛等防卫日本通过防卫大纲 明确提出加强钓鱼岛等防卫</a></li>
                    <li><a href="#">温家宝：彻底解决中印边界问题需耐心和时间</a></li>
                    <li><a href="#">菲律宾称不会对人质事件中香港遇难者作出赔偿</a></li>
                    <li>11月份全国楼市再度量价齐涨 可能引发第三轮调控</li>
                    <li>山西巡警队长成黑老大敛财数亿 27套房被查封</li>
                </ul>
                <a class="aleft" href="#up"><i class="fa fa-caret-left"></i></a>
                <a class="aright" href="#down"><i class="fa fa-caret-right"></i></a>
            </div>
        </div>
        <!--/notices-slider-->
        <footer class="grid-50 mobile-grid-50">
            <span class="copyright">
                <i class="fa fa-copyright fw"></i>{:date('Y')}&nbsp;
                <a href="/" target="_blank">{$site_conf['site_app_name']}</a>&nbsp;
                <a href="#">{$site_conf['site_app_version']}</a>
            </span>
            <if condition="true"><!--侧边栏开关/-->
                <!--clockzone-->
                <span class="clock-zone">
                    <span class="clock">                        
                        <span title="">0000-00-00 00:00:00</span>
                        <i class="icon fa fa-sun-o" title=""></i>
                    </span>
                </span>
                <!--/clockzone-->
            </if>
        </footer>
    </div>
    <!--/底部区域-->
    <!--来电弹屏-->
    <a id="call-reminder" class="xsui-lnk-edit-dialog-g" title="来电提醒" href="#" target="_blank" onclick="$(this).hide();" data-url="{:U('Customer/customer_popup','tel=vartel')}" data-screenpopup-url="{:U('ApiCallRecord/screen_popup','jsonp=varjsonp&rnd=varrnd&exten='.$login_data['user_name'])}" data-screenpopup-mode="{$SCREENPOPUP_MODE}" style="position: absolute; right:1px; top:0px; background-color: #F60; padding: 7px 80px 8px; color:#FFF; text-align: center; line-height: 18px; display:none; z-index:999">您有新来电</a>
    <!--/来电弹屏-->
    <!--页面变量区域-->
    <div id="window-config-text" style="display:none">"KINDEDITOR_UPLOADER":"{:U('UploadHandler/kindeditor_upload')}"</div>
    <!--/页面变量区域-->
    <!--底部脚本区域-->
    <script src="__THEME__Ctrl/Index/index.js" type="text/javascript"></script>
    <if condition="'SEAT' eq $login_data['type_name']">
        <script src="__THEME__Script/ScreenPopup-2.0.js" type="text/javascript"></script>
    </if>
    <script type="text/javascript">
        window.config = $.parseJSON('{' + $('#window-config-text').text() + '}');
        // 来电弹屏初始化
        if ('undefined' != typeof (ScreenPopup)) {
            ScreenPopup.init({data_url: $('#call-reminder').data('screenpopupUrl')});
        }
        // 注销登录并退出队列 2016-4-19
        $('.lnk-logout').click(function () {
            if (!confirm('您确定要退出登录吗?')) {
                return false;
            }
            var $a = $('.exten-workbench-sign-switch');
            if ($a[0]) {
                if ($a.find('span').text() == '签入队列') {
                    console.log('无需退出队列!');
                    return true;
                }
                $.get($a.attr('href').replace('varsign', 'LOGOUT'), function (data) {
                    console.log(data);
                });
                console.log('退出队列成功!');
            }
            return true;
        })
    </script>
    <!--/底部脚本区域-->
</body>
</html>